import java.util.Scanner;

/**
 * Created by dllo on 18/3/29.
 */
public class Test04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入一个3位数");
        //shift+F6 重命名
        int num = scanner.nextInt();
        int rowNum = num;//原始信息
        int hundreds = num / 100;//百位
        num %= 100;
        int tens = num / 10;//十位
        num %= 10;//个位
        if (rowNum == hundreds * hundreds * hundreds +
                tens * tens * tens + num * num * num) {
            System.out.println("水仙花数");
        } else {
            System.out.println("不是水仙花数");
        }
    }
}
